<%@ taglib
	uri="http://java.sun.com/jsp/jstl/core"
	prefix="c"%>
<%@ taglib
	uri="http://www.springframework.org/tags/form"
	prefix="form"%>

<form:form
	name="createAccountForm"
	action="doCreateAccount"
	commandName="accountBean"
	method="POST"
	id="createAccountForm">
	<div
		id="content"
		class='profile'>




		<div
			id="CreateAccountForm_6_pnlProfile"
			class="profileForm">

			<script
				type="text/javascript"
				language="javascript">
				function compareEmailFields(source, clientside_arguments) {
					clientside_arguments.IsValid = areFieldValuesEqualIgnoreCase(
							"CreateAccountForm_6_txtEmail",
							"CreateAccountForm_6_txtConfirmEmail");
					//alert(clientside_arguments.IsValid);
				}
				function checkDaytimePhone(source, clientside_arguments) {
					if ($("#CreateAccountForm_6_ddlCountry").val() == 'US') {
						var regex = /^\d{3}-\d{3}-\d{4}$/;
						var phone = $("#CreateAccountForm_6_txtDaytimePhone")
								.val();
						if (!regex.test(phone)) {
							clientside_arguments.IsValid = false;
						} else {
							clientside_arguments.IsValid = true;
						}
					} else {
						clientside_arguments.IsValid = true;
					}
				}
				function createAccount() {
					document.createAccountForm.submit();
					return true;
				}
			</script>

			<div
				id="CreateAccountForm_6_vsProfileForm"
				class="valSummary clear"
				style="color: Red; display: none;"></div>

			<div
				class="valSummary clear"
				style="color: #ff0000;">
				<span id="CreateAccountForm_6_lblCreateUserError">
				<form:errors path="*"/>
				</span>
			</div>

			<div class="profileFormContainer clear">
				<h3>Contact Information</h3>

				
				
				<div class="left">

					<label
						for="CreateAccountForm_6_txtFirstName"
						id="CreateAccountForm_6_lblFirstName">First Name* </label>
					<form:input
						path="first"
						name="CreateAccountForm_6$txtFirstName"
						type="text"
						id="CreateAccountForm_6_txtFirstName"
						style="width: 245px;" />					
					<label style="clear: none; width: 25px; margin-left: 10px;">MI </label>
					<form:input
						path="mi"
						name="CreateAccountForm_6$txtMiddleInitial"
						type="text"
						id="CreateAccountForm_6_txtMiddleInitial"
						style="width: 20px;" />
					<label
						for="CreateAccountForm_6_txtLastName"
						id="CreateAccountForm_6_lblLastName">LastName* </label>
					<form:input
						path="last"
						name="CreateAccountForm_6$txtLastName"
						type="text"
						id="CreateAccountForm_6_txtLastName" />
					<label>Address 1*</label>
					<form:input
						path="address1"
						name="CreateAccountForm_6$txtAddress1"
						type="text"
						id="CreateAccountForm_6_txtAddress1" />
					<label>Address 2</label>
					<form:input
						path="address2"
						name="CreateAccountForm_6$txtAddress2"
						type="text"
						id="CreateAccountForm_6_txtAddress2" />
					<label>City*</label>
					<form:input
						path="city"
						name="CreateAccountForm_6$txtCity"
						type="text"
						id="CreateAccountForm_6_txtCity" />
					<label>State*</label>
					<form:select
						path="state"
						name="CreateAccountForm_6$ddlState"
						id="CreateAccountForm_6_ddlState">
						<form:option value="" label="Select State"/>
						<form:options
							items="${states}"
							itemValue="code"
							itemLabel="description" />
					</form:select>
					<label style="clear: none; width: 60px; margin-left: 10px;">Zip Code*</label> 
					<form:input
						path="zip"
						name="CreateAccountForm_6$txtZipcode"
						type="text"
						id="CreateAccountForm_6_txtZipcode"
						style="width: 100px;" /> 
					<label
						for="CreateAccountForm_6_ddlCountry"
						id="CreateAccountForm_6_lblCountry">Country*</label>
					<form:select
						path="country"
						name="CreateAccountForm_6$ddlCountry"
						id="CreateAccountForm_6_ddlCountry">
						<form:option value="" label="Select country"/>
						<form:options
							items="${countries}"
							itemValue="code"
							itemLabel="description" />
					</form:select>
				</div>
				<div class="right">
					<label>Gender</label>
					<form:select
						path="gender"
						name="CreateAccountForm_6$ddlGender"
						id="CreateAccountForm_6_ddlGender">
						<form:option value="" label="Select"/>
						<form:options
							items="${gender}"
							itemValue="code"
							itemLabel="description" />
					</form:select> 
					<label>Email*</label>
					<form:input
						path="email"
						name="CreateAccountForm_6$txtEmail"
						type="text"
						id="CreateAccountForm_6_txtEmail" /> 
					<label>Re-enter Email*</label>
					<input
					    path="confirmEmail"
						name="CreateAccountForm_6$txtConfirmEmail"
						type="text"
						id="CreateAccountForm_6_txtConfirmEmail" /> 
					<label>Daytime Phone*</label>
					<form:input
						path="dayPhone"
						name="CreateAccountForm_6$txtDaytimePhone"
						type="text"
						id="CreateAccountForm_6_txtDaytimePhone" /> 
					<label>Mobile Phone</label>
					<form:input
						path="mobilePhone"
						name="CreateAccountForm_6$txtMobilePhone"
						type="text"
						id="CreateAccountForm_6_txtMobilePhone" /> 
					<label>Fax</label>
					<form:input
						path="fax"
						name="CreateAccountForm_6$txtFax"
						type="text"
						id="CreateAccountForm_6_txtFax" />
				</div>
			</div>
			<div class="profileFormContainer clear">
				<h3>Login information</h3>
				<div class="left">
					<label style="width: 135px;">Username*</label>
					<form:input
						path="username"
						name="CreateAccountForm_6$txtUserName"
						type="text"
						maxlength="30"
						id="CreateAccountForm_6_txtUserName" /> 
					<label style="width: 135px;">Password*</label>
					<form:input
						path="password"
						name="CreateAccountForm_6$txtPassword"
						type="password"
						maxlength="25"
						id="CreateAccountForm_6_txtPassword" /> 
					<label style="width: 135px;">Confirm Password*</label>
					<form:input
					    path="confirmPassword"
						name="CreateAccountForm_6$txtConfirmPassword"
						type="password"
						maxlength="25"
						id="CreateAccountForm_6_txtConfirmPassword" />
				</div>
				<div class="right">
					<label style="width: 400px; margin-top: 3px;">Username and Password can be a
						combination of letters, numbers, and symbols (@ # $ % & !) up to a max of 25
						characters</label> <label style="width: 400px; margin-top: 40px;">Re-enter your
						Password to confirm</label>
				</div>
				<div class="emailOptIn clear">
					<form:checkbox
					    value="Y"
						path="receiveMail"
						id="CreateAccountForm_6_chkEmailOptIn"
						name="CreateAccountForm_6$chkEmailOptIn" />
					<label
						for="CreateAccountForm_6_chkEmailOptIn">I would like to receive email
						notifications about AAAU events.</label>
				</div>
			</div>
			<div class="profileFormContainer clear">
				<h3>
					Enter a Security Question and Answer<br />This question will be asked if you forget
					your username or password.
				</h3>
				<label
					for="CreateAccountForm_6_ddlSecurityQuestion"
					id="CreateAccountForm_6_lblSecurityQuestion"
					style="width: 145px;">Security Question*</label> 
				<form:select
					path="question"
					name="CreateAccountForm_6$ddlSecurityQuestion"
					id="CreateAccountForm_6_ddlSecurityQuestion"
					style="width: 305px;">
					<form:option value="">Select</form:option>
					<form:option value="What is your city of birth?">What is your city of birth?</form:option>
					<form:option value="What is your mother&#39;s maiden name?">What is your
						mother&#39;s maiden name?</form:option>
					<form:option value="What is your pet&#39;s name?">What is your pet&#39;s name?</form:option>
					<form:option value="What was the name of the first car you drove?">What was the
						name of the first car you drove?</form:option>
				</form:select> 
				<label
					for="CreateAccountForm_6_txtSecurityAnswer"
					id="CreateAccountForm_6_lblSecurityAnswer"
					style="clear: none; margin-left: 70px; width: 70px">Answer*</label> 
				<form:input
					path="answer"
					name="CreateAccountForm_6$txtSecurityAnswer"
					type="text"
					id="CreateAccountForm_6_txtSecurityAnswer" />
			</div>
			<div
				class="profileFormContainer"
				style="padding: 0px 0 80px 0; position: relative; border-top: solid 1px #989296;">
				<a
					id="CreateAccountForm_6_btnCreateAccount"
					class="btnAccount"
					href="javascript:createAccount()"
					style="position: absolute; right: 0px; top: 0px;">Create an Account</a>


			</div>


		</div>
	</div>


</form:form>